package com.liar.modular.system.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author lk123
 * @since 2020-07-03
 */
@TableName("sys_menu")
public class SysMenu extends Model<SysMenu> {

    private static final long serialVersionUID = 1L;
    @TableId
    private String id;
    /**
     * 菜单名字
     */
    private String name;
    /**
     * 链接
     */
    private String url;
    /**
     * 菜单图标
     */
    private String icon;
    /**
     * 菜单编号
     */
    private String code;
    /**
     * 状态：1启用 0不启用
     */
    private String status;
    /**
     * 菜单等级
     */
    private String levels;
    /**
     * 菜单排序
     */
    private String sort;
    /**
     * 父级id
     */
    private String parent;
    @TableField("is_menu")
    private String isMenu;
    @TableField("is_end")
    private boolean isEnd;
    @TableField(exist = false)
    private List<SysMenu> childrens;

    public List<SysMenu> getChildrens() {
        return childrens;
    }

    public void setChildrens(List<SysMenu> childrens) {
        this.childrens = childrens;
    }

    public String getIsMenu() {
        return isMenu;
    }

    public void setIsMenu(String isMenu) {
        this.isMenu = isMenu;
    }

    public boolean isEnd() {
        return isEnd;
    }

    public void setEnd(boolean end) {
        isEnd = end;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getLevels() {
        return levels;
    }

    public void setLevels(String levels) {
        this.levels = levels;
    }


    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String getParent() {
        return parent;
    }

    public void setParent(String parent) {
        this.parent = parent;
    }

    @Override
    public String toString() {
        return "SysMenu{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", url='" + url + '\'' +
                ", icon='" + icon + '\'' +
                ", code='" + code + '\'' +
                ", status='" + status + '\'' +
                ", levels='" + levels + '\'' +
                ", sort='" + sort + '\'' +
                ", parent='" + parent + '\'' +
                ", isMenu='" + isMenu + '\'' +
                ", isEnd=" + isEnd +
                ", childrens=" + childrens +
                '}';
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
